#ifndef _SLICETYPE_H_
#define _SLICETYPE_H_
#include "SimpleNode.h"
class IVisitor;
class sliceType;
typedef QSharedPointer<sliceType> sliceTypePtr;

class sliceType: public SimpleNode
{
public:
    explicit sliceType(int nodeId=-1);
    virtual ~sliceType();
    
    
    
    virtual QString type() const;
    virtual QString toString() const;
    virtual void accept(IVisitor* visitor, const SimpleNodePtr& node);
    virtual void traverse(IVisitor* visitor);
private:
};



typedef QListIterator<sliceTypePtr> SliceTypePtrListIterator;

class SliceTypeList: public QList<sliceTypePtr>
{
public:
    inline SliceTypeList() { }
    inline explicit SliceTypeList(sliceTypePtr i) { append(i); }
    inline SliceTypeList(const SliceTypeList &l) : QList<sliceTypePtr>(l) { }
    inline SliceTypeList(const QList<sliceTypePtr> &l) : QList<sliceTypePtr>(l) { }

    inline SliceTypeList operator+(const SliceTypeList &other) const
    { SliceTypeList n = *this; n += other; return n; }
    inline SliceTypeList &operator<<(sliceTypePtr it)
    { append(it); return *this; }
    inline SliceTypeList &operator<<(const SliceTypeList &l)
    { *this += l; return *this; }

    QString toString() const
    {
        QString str("SliceTypeList(");
        foreach(sliceTypePtr it, *this){
            if (it != NULL){
                str += it->toString()+",";
            }
        }
        str += ")";
        return str;
    }

    void traverse(IVisitor* visitor)
    {
        foreach(sliceTypePtr it, *this){
            if (it != NULL){
                it->accept(visitor, it);
            }
        }
    }
};



#endif